package UserInterface;

import javax.swing.JPanel;
import javax.swing.JLabel;
import java.awt.Font;
import java.awt.Color;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.JButton;
import java.awt.Label;
import java.awt.event.ActionListener;

import javax.swing.JTextField;

public class BalanceOfBank extends JPanel {
	private JLabel textField50usd;
	private JLabel textField100usd;
	private JLabel textField10usd;
	private JLabel textField200usd;
	private JLabel textField10uan;
	private JLabel textField50uan;
	private JLabel textField100uan;
	private JLabel textField200uan;
	private JLabel textField10eur;
	private JLabel textField50eur;
	private JLabel textField100eur;
	private JLabel textField200eur;
	
	public void putText10(String text){
		textField10uan.setText(text);
	}
	public void putText50(String text){
		textField50uan.setText(text);
	}
	public void putText100(String text){
		textField100uan.setText(text);
	}
	public void putText200(String text){
		textField200uan.setText(text);
	}

	/**
	 * Create the panel.
	 */
	
	JButton btnOk = new JButton("OK");
	public void addOKListener(ActionListener list){
		btnOk.addActionListener(list);
	}
	
	public BalanceOfBank() {
		this.setSize(500, 500);
		setBackground(new Color(255, 248, 220));
		
		JLabel lblBalanceOfBank = new JLabel("Balance of Bank:");
		lblBalanceOfBank.setForeground(new Color(128, 0, 0));
		lblBalanceOfBank.setFont(new Font("Arial", Font.BOLD | Font.ITALIC, 18));
		
		JLabel lblUsd = new JLabel("");
		lblUsd.setFont(new Font("Tahoma", Font.BOLD, 15));
		
		JLabel lblUan = new JLabel("UAN:");
		lblUan.setFont(new Font("Tahoma", Font.BOLD, 15));
		
		JLabel lblEur = new JLabel("");
		lblEur.setFont(new Font("Tahoma", Font.BOLD, 15));
		
		btnOk.setForeground(new Color(128, 0, 0));
		btnOk.setFont(new Font("Arial", Font.BOLD, 14));
		
		JLabel label10usd = new JLabel("");
		label10usd.setFont(new Font("Tahoma", Font.PLAIN, 15));
		
		JLabel label50usd = new JLabel("");
		label50usd.setFont(new Font("Tahoma", Font.PLAIN, 15));
		
		JLabel label100usd = new JLabel("");
		label100usd.setFont(new Font("Tahoma", Font.PLAIN, 15));
		
		JLabel label200usd = new JLabel("");
		label200usd.setFont(new Font("Tahoma", Font.PLAIN, 15));
		
		JLabel label10uan = new JLabel("10:");
		label10uan.setFont(new Font("Tahoma", Font.PLAIN, 15));
		
		JLabel label50uan = new JLabel("50:");
		label50uan.setFont(new Font("Tahoma", Font.PLAIN, 15));
		
		JLabel label100uan = new JLabel("100:");
		label100uan.setFont(new Font("Tahoma", Font.PLAIN, 15));
		
		JLabel label200uan = new JLabel("200:");
		label200uan.setFont(new Font("Tahoma", Font.PLAIN, 15));
		
		JLabel label10eur = new JLabel("");
		label10eur.setFont(new Font("Tahoma", Font.PLAIN, 15));
		
		JLabel label50eur = new JLabel("");
		label50eur.setFont(new Font("Tahoma", Font.PLAIN, 15));
		
		JLabel label100uer = new JLabel("");
		label100uer.setFont(new Font("Tahoma", Font.PLAIN, 15));
		
		JLabel label200uer = new JLabel("");
		label200uer.setFont(new Font("Tahoma", Font.PLAIN, 15));
		
		textField50usd = new JLabel("",10);
		//textField50usd.setColumns(10);
		
		textField100usd = new JLabel("",10);
		//textField100usd.setColumns(10);
		
		textField10usd = new JLabel("",10);
		//textField10usd.setColumns(10);
		
		textField200usd = new JLabel("",10);
		//textField200usd.setColumns(10);
		
		textField10uan = new JLabel("",10);
		textField10uan.setFont(new Font("Tahoma", Font.PLAIN, 15));
		textField50uan = new JLabel("",10);
		textField50uan.setFont(new Font("Tahoma", Font.PLAIN, 15));
		//textField50uan.setColumns(10);
		
		textField100uan =  new JLabel("",10);
		textField100uan.setFont(new Font("Tahoma", Font.PLAIN, 15));
		//textField100uan.setColumns(10);
		
		textField200uan =  new JLabel("",10);
		textField200uan.setFont(new Font("Tahoma", Font.PLAIN, 15));
		//textField200uan.setColumns(10);
		
		textField10eur =new JLabel("",10);
		//textField10eur.setColumns(10);
		
		textField50eur =new JLabel("",10);
		//textField50eur.setColumns(10);
		
		textField100eur =new JLabel("",10);
		//textField100eur.setColumns(10);
		
		textField200eur =new JLabel("",10);;
		//textField200eur.setColumns(10);
		GroupLayout groupLayout = new GroupLayout(this);
		groupLayout.setHorizontalGroup(
			groupLayout.createParallelGroup(Alignment.TRAILING)
				.addGroup(groupLayout.createSequentialGroup()
					.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
					.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
						.addGroup(groupLayout.createSequentialGroup()
							.addGap(37)
							.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
								.addComponent(lblUan, GroupLayout.PREFERRED_SIZE, 48, GroupLayout.PREFERRED_SIZE)
								.addComponent(lblUsd)
								.addGroup(groupLayout.createParallelGroup(Alignment.LEADING, false)
									.addGroup(groupLayout.createSequentialGroup()
										.addComponent(label10usd, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE)
										.addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
										.addComponent(textField10usd, GroupLayout.PREFERRED_SIZE, 233, GroupLayout.PREFERRED_SIZE))
									.addGroup(groupLayout.createSequentialGroup()
										.addComponent(label50usd, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE)
										.addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
										.addComponent(textField50usd, GroupLayout.PREFERRED_SIZE, 233, GroupLayout.PREFERRED_SIZE))
									.addGroup(groupLayout.createSequentialGroup()
										.addGroup(groupLayout.createParallelGroup(Alignment.TRAILING)
											.addGroup(groupLayout.createSequentialGroup()
												.addComponent(label100usd)
												.addGap(20))
											.addGroup(groupLayout.createSequentialGroup()
												.addComponent(label200usd)
												.addGap(18)))
										.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
											.addComponent(textField100usd, GroupLayout.PREFERRED_SIZE, 233, GroupLayout.PREFERRED_SIZE)
											.addComponent(textField200usd, GroupLayout.PREFERRED_SIZE, 233, GroupLayout.PREFERRED_SIZE))))
								.addGroup(groupLayout.createSequentialGroup()
									.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
										.addComponent(label10uan, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE)
										.addComponent(label200uan, GroupLayout.PREFERRED_SIZE, 29, GroupLayout.PREFERRED_SIZE)
										.addComponent(label100uan, GroupLayout.PREFERRED_SIZE, 29, GroupLayout.PREFERRED_SIZE)
										.addComponent(label50uan, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE))
									.addGap(18)
									.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
										.addComponent(textField10uan, GroupLayout.PREFERRED_SIZE, 233, GroupLayout.PREFERRED_SIZE)
										.addComponent(textField50uan, GroupLayout.PREFERRED_SIZE, 233, GroupLayout.PREFERRED_SIZE)
										.addComponent(textField100uan, GroupLayout.PREFERRED_SIZE, 233, GroupLayout.PREFERRED_SIZE)
										.addComponent(textField200uan, GroupLayout.PREFERRED_SIZE, 233, GroupLayout.PREFERRED_SIZE)))
								.addComponent(lblEur, GroupLayout.PREFERRED_SIZE, 37, GroupLayout.PREFERRED_SIZE)
								.addGroup(groupLayout.createSequentialGroup()
									.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
										.addComponent(label10eur, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE)
										.addGroup(groupLayout.createParallelGroup(Alignment.TRAILING)
											.addComponent(label100uer, GroupLayout.PREFERRED_SIZE, 29, GroupLayout.PREFERRED_SIZE)
											.addComponent(label200uer, GroupLayout.PREFERRED_SIZE, 29, GroupLayout.PREFERRED_SIZE)
											.addComponent(label50eur, Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE)))
									.addGap(18)
									.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
										.addComponent(textField10eur, GroupLayout.PREFERRED_SIZE, 233, GroupLayout.PREFERRED_SIZE)
										.addComponent(textField50eur, GroupLayout.PREFERRED_SIZE, 233, GroupLayout.PREFERRED_SIZE)
										.addComponent(textField100eur, GroupLayout.PREFERRED_SIZE, 233, GroupLayout.PREFERRED_SIZE)
										.addComponent(textField200eur, GroupLayout.PREFERRED_SIZE, 233, GroupLayout.PREFERRED_SIZE)
										.addComponent(btnOk, Alignment.TRAILING, GroupLayout.PREFERRED_SIZE, 78, GroupLayout.PREFERRED_SIZE)))))
						.addGroup(groupLayout.createSequentialGroup()
							.addGap(151)
							.addComponent(lblBalanceOfBank)))
					.addGap(208))
		);
		groupLayout.setVerticalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
					.addGap(5)
					.addComponent(lblBalanceOfBank)
					.addGap(29)
					.addComponent(lblUsd)
					.addGap(4)
					.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
						.addComponent(label10usd)
						.addComponent(textField10usd, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
						.addComponent(label50usd, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)
						.addComponent(textField50usd, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
						.addComponent(label100usd, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)
						.addComponent(textField100usd, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
						.addComponent(label200usd, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)
						.addComponent(textField200usd, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addGap(13)
					.addComponent(lblUan, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)
					.addPreferredGap(ComponentPlacement.RELATED)
					.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
						.addGroup(groupLayout.createSequentialGroup()
							.addComponent(textField10uan, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
							.addGap(7)
							.addComponent(textField50uan, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
						.addGroup(groupLayout.createSequentialGroup()
							.addComponent(label10uan, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)
							.addPreferredGap(ComponentPlacement.UNRELATED)
							.addComponent(label50uan, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)))
					.addGap(5)
					.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
						.addGroup(groupLayout.createSequentialGroup()
							.addGap(24)
							.addComponent(label200uan, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)
							.addPreferredGap(ComponentPlacement.UNRELATED)
							.addComponent(lblEur, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))
						.addGroup(groupLayout.createSequentialGroup()
							.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
								.addComponent(textField100uan, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
								.addComponent(label100uan, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))
							.addGap(7)
							.addComponent(textField200uan, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
					.addPreferredGap(ComponentPlacement.RELATED)
					.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
						.addGroup(groupLayout.createSequentialGroup()
							.addComponent(label10eur, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)
							.addPreferredGap(ComponentPlacement.RELATED)
							.addComponent(label50eur, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)
							.addPreferredGap(ComponentPlacement.RELATED)
							.addComponent(label100uer, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)
							.addPreferredGap(ComponentPlacement.RELATED)
							.addComponent(label200uer, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))
						.addGroup(groupLayout.createSequentialGroup()
							.addComponent(textField10eur, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
							.addGap(7)
							.addComponent(textField50eur, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
							.addGap(8)
							.addComponent(textField100eur, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
							.addGap(7)
							.addComponent(textField200eur, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
					.addPreferredGap(ComponentPlacement.UNRELATED)
					.addComponent(btnOk)
					.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
		);
		setLayout(groupLayout);

	}
}
